import { createStore } from 'vuex'
import createPersistedstate from 'vuex-persistedstate'


export default createStore({
  state: {
  },
  getters: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
  },
  plugins: [
    // 持久化插件
    createPersistedstate({
      // storage: window.sessionStorage,
      reducer(val) {
        return {
          // 储存state
          dataList: val
        }
      }
    })
  ],
})